<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2022\1\13 0013
 * Time: 13:23
 */

// 判断是否是json格式
function is_json($string)
{
    $res=json_decode($string);
    var_dump($res);
    die();
    return (json_last_error() == JSON_ERROR_NONE);
}

$res2=array(
    '11'=>1,
    '22'=>2
);
$res2=json_encode($res2);
$string =-41001;
$res=is_json($string);
var_dump($res);
die();

